﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EvoAlgLib
{
    public abstract class UnaryFunc: Func
    {
        public UnaryFunc() : base(1) { }


        public override double getVal(params double[] args)
        {
            if (args.Count() < 1)
                throw new ArgumentException("This function takes exactly two arguements.");
            return this.unaryFunc(args[0]);
        }
        public abstract double unaryFunc(double x);
    }
}
